package com.example.ktapplication.fragment

import android.annotation.SuppressLint
import android.os.Bundle
import com.example.ktapplication.R
import com.example.ktapplication.base.BaseFragment
import com.example.ktapplication.databinding.FragmentProjectBinding
import com.example.ktapplication.utils.event.Event
import com.example.ktapplication.utils.event.EventBusUtil

class ProjectFragment : BaseFragment<FragmentProjectBinding>() {

    private val projectTabFragment by lazy {
        ProjectTabFragment()
    }

    override fun getViewBind(): FragmentProjectBinding {
        return FragmentProjectBinding.inflate(layoutInflater)
    }

    override fun onDate(savedInstanceState: Bundle?) {

    }

    @SuppressLint("ResourceType")
    override fun onViewBing() {
        initTitleBar()
        showFragment(projectTabFragment, R.id.statusLayout)
    }

    private fun initTitleBar() {
        binding.titleBar.tvTitle?.text = "项目"
        binding.titleBar.imgFind?.setOnClickListener {
            EventBusUtil.eventBus.post(Event.MainClickFind())
        }
        binding.titleBar.imgMenu?.setOnClickListener {
            EventBusUtil.eventBus.post(Event.MainClickMenu())
        }
    }


}
